import { defineStore } from "pinia";

export const useViewStore = defineStore("view-store", {
  // Store（存储）​
  state: () => ({
    // 是否欢迎页
    isWelcome: localStorage.getItem("isWelcome")
      ? localStorage.getItem("isWelcome")
      : true,
  }),
  getters: {},
  actions: {
    set_isWelcome(opt: boolean) {
      this.isWelcome = opt;
      localStorage.setItem("isWelcome", String(opt));
    },
  },
});
